package coml.jiyun.hp.day02.presenter;

import coml.jiyun.hp.day02.bean.Bean;
import coml.jiyun.hp.day02.model.MainPageModel;
import coml.jiyun.hp.day02.net.ReslutCallBack;
import coml.jiyun.hp.day02.view.MainPageView;

public class MainPagePresenter {

    private MainPageView mView;
    private final MainPageModel mModle;

    public MainPagePresenter(MainPageView mView) {
        this.mView = mView;
        mModle=new MainPageModel();
    }

    public void getData(int page){
        mModle.getData(page, new ReslutCallBack<Bean>() {
            @Override
            public void onSuccess(Bean bean) {
                mView.setData(bean);
            }

            @Override
            public void onFail(String msg) {

            }
        });
    }
}